<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            background-color: pink;
            transition: all 1s;
            animation-name: move;
            animation-duration: 3s;
            animation-timing-function: ease;
            /* animation-delay: 1s; */
            animation-iteration-count: 1;
            /* 是否逆播放 */
            animation-direction: alternate;
            /* 动画结束之后的状态 */
            animation-fill-mode: backwards;
            /* animation: 动画名称 持续时间 运动曲线 何时开始 播放次数 是否反方向 起始与结束状态 */
            animation: name duration timing-function delay iteration-count direction fill-mode;
        }
        div:hover{   
            /* 规定动画是否暂停或者播放 */
            animation-play-state: paused;
        }
        @keyframes move{
            0%{
                transform: translate(0, 0);
            }
            25%{
                transform: translate(1000px, 0);
            }
            50%{
                transform: translate(1000px, 500px);
            }
            100%{
                transform: translate(0, 500px);
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>